<?
    $this->placeholder('page_title')->set('Meta Modules');
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
$this->dojo()
                 ->addStyleSheet('/scripts/dijit/themes/tundra/tundra.css')
                 ->addStyleSheet('/scripts/dojo/resources/dojo.css')
             ->setDjConfigOption('parseOnLoad', true);

$rand = '/rand/' . rand(0, 10000);

$mvc = new Administer_Lib_Meta_MVC();

?>
<h2>Modules</h2>


<?
$this->tabContainer(
)->captureStart(   'modules',
    array('dojoType'=>"dijit.layout.TabContainer" ),
    array('style' => 'width: 800px; height: 400px; border: 1px;'),
    array('dojoType'=>"dijit.layout.TabContainer" )); ?>

<? foreach($this->modules as $module):
$params = array(
    'module' => 'administer',
    'controller' => 'meta',
    'action' => 'addformcreate',
    'params' => array('meta_module' => $module),
        'rand' => $rand
);
?>
<? $this->contentPane()->captureStart($module, array('title' => $module)) ?>
<? foreach(array('adddomain' => 'Add Domain Class',
               'addform' => 'Add Domain Form',
               'addaction' => 'Add Action',
              'addformentry' => 'Add Entry Action',
               'addactionlist' => 'Add List Action') as $action => $title):
        $params['action'] = $action;
        $page = new Zend_Navigation_Page_Mvc($params);
?>
    <a href="<?=  $page->getHref() ?>" class="linkbutton"><?= $title ?></a>
 <? endforeach; ?>
    <h2><?= ucwords($module) ?> Controllers</h2>
    <ul>
    <? foreach ($mvc->controllers($module, TRUE) as $controller): ?>
        <li><?= $controller ?></li>
    <? endforeach; ?>
    </ul>

<?= $this->contentPane()->captureEnd($module); ?>
<? endforeach; ?>
<?= $this->tabContainer()->captureEnd('modules') ?>